WebInput.NET DisplayFormat has client side events model. Every client side event handler at least has 1 parameter (controlId).
In this topic, you will learn how to use DisplayFormat client side events in WebInput.
To use WebInput DisplayFormat events
- Drag WebInput instance to WebForm.
- Go to WebInput DisplayFormatClientSideEvents property.
- Add WebInput1_OnAfterValidate to OnAfterValidate event.
- Add WebInput1_OnBeforeValidate to OnBeforeValidate event.
- Add WebInput1_OnValidateError to OnValidateError event.
- In client side, add WebInput1_OnAfterValidate function and put the following code:
JavaScript Copy Code
function WebInput1_OnAfterValidate(controlId)
{
alert("OnAfterValidate event is triggered");
}
- In client side add WebInput1_OnBeforeValidate function and put some code in it.
JavaScript Copy Code
function WebInput1_OnBeforeValidate(controlId)
{
alert("OnBeforeValidate event is triggered");
}
- In client side, add WebInput1_OnValidateError function and put the following code:
JavaScript Copy Code
function WebInput1_OnValidateError(controlId)
{
alert("OnValidateError event is triggered");
}
- Compile and run the Project.